package cn.tansanqinger.dao.sql.catalogue;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;

import cn.tansanqinger.dao.sql.ICatalogueDispose;
import cn.tansanqinger.pojo.Catalogue;

@Repository
public class CatalogueDisposeMessage {
	
	@Autowired
	public ICatalogueDispose dispose ;
	
	public boolean insert(Catalogue catalogue) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean deleteCno_Ctop(Integer cno) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean deleteCno(Integer cno) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean updateCno(Integer cno, Integer ncno) {
		// TODO Auto-generated method stub
		return false;
	}

	public boolean updateSingle(Catalogue catalogue) {
		// TODO Auto-generated method stub
		return false;
	}

	//查询全部数据
	public List<Catalogue> selectAll() {
		return dispose.selectList(null);
	}

	public List<Catalogue> selectOnes(Integer ctop) {
		QueryWrapper<Catalogue> queryWrapper = new QueryWrapper<Catalogue>();
		queryWrapper.lambda().eq(Catalogue::getCtop, ctop);
		return dispose.selectList(queryWrapper);
	}

	public Catalogue selectOne(Integer cno) {
		
		return null;
	}
}
